#include<iostream>
#include<vector>
#include<queue>
#include<cstring>
#include<cmath>
#include<map>
#include<set>
#include<cstdio>
#include<algorithm>
#define debug(a) cout<<#a<<"="<<a<<endl;
using namespace std;
const int maxn=1e5+100;
typedef long long LL;
inline LL read(){LL x=0,f=1;char ch=getchar();	while (!isdigit(ch)){if (ch=='-') f=-1;ch=getchar();}while (isdigit(ch)){x=x*10+ch-48;ch=getchar();}
return x*f;}
LL a[maxn];
int main(void)
{
  ///cin.tie(0);std::ios::sync_with_stdio(false);
  LL n;cin>>n;
  memset(a,-1,sizeof(a));
  cout<<"? "<<1<<"\n";
  cin>>a[1];
  cout<< "? "<<n<<"\n";
  cin>>a[n];
  LL l=1;LL r=n;
  a[0]=1e18;a[n+1]=1e18;
  while(l<r){
    LL mid=(l+r)>>1;
    cout<<"? "<<mid<<"\n";
    cin>>a[mid];
    if(a[mid]<=a[mid-1]&&a[mid]<=a[mid+1]){
        cout<<"! "<<mid<<"\n";
        break;
    }
    if(a[mid-1]==-1){
        cout<<"? "<<mid-1<<"\n";
        cin>>a[mid-1];
    }
    if(a[mid-1]<a[mid]) r=mid;
    else l=mid;
  }
return 0;
}
